package redis

import (
	"context"
	"fmt"
	"github.com/go-redis/redis/v8"
	"kill/common/nacos"
)

var Rdb *redis.Client

func RedisInit() {
	Rdb = redis.NewClient(&redis.Options{
		Addr:     nacos.NacosConfig.Redis.Addr,
		Password: "", // no password set
		DB:       0,  // use default DB
	})
	fmt.Println("redis连接成功")

}
func GoodsLPush(key string, value string) {
	Rdb.LPush(context.Background(), key, value)
}
